import request from '@/utils/request'

// 创建会员等级
export function createSystemUserLevel(data) {
  return request({
    url: '/user/system-user-level/create',
    method: 'post',
    data: data
  })
}

// 更新会员等级
export function updateSystemUserLevel(data) {
  return request({
    url: '/user/system-user-level/update',
    method: 'put',
    data: data
  })
}

// 删除会员等级
export function deleteSystemUserLevel(id) {
  return request({
    url: '/user/system-user-level/delete?id=' + id,
    method: 'delete'
  })
}

// 获得会员等级
export function getSystemUserLevel(id) {
  return request({
    url: '/user/system-user-level/get?id=' + id,
    method: 'get'
  })
}

// 获得会员等级分页
export function getSystemUserLevelPage(params) {
  return request({
    url: '/user/system-user-level/page',
    method: 'get',
    params
  })
}
// 导出会员等级 Excel
export function exportSystemUserLevelExcel(params) {
  return request({
    url: '/user/system-user-level/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}